package io.sdl.common.sys.entity;

import io.sdl.common.sys.dto.SdlPatientDTO;
import io.sdl.common.sys.dto.SdlSessionMessageDTO;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.Data;

import java.security.Principal;
import java.util.Date;

@Data
public class ResponseMessage implements Principal {
    @SchemaProperty(name = "")
    private String messageId;

    @SchemaProperty(name = "会话id")
    private String sessionId;

    @SchemaProperty(name = "发送者token")
    private String token;

    @SchemaProperty(name = "发送者id")
    private String senderId;

    @SchemaProperty(name = "发送内容")
    private String content;

    @SchemaProperty(name = "消息类型")
    private String messageType;

    @SchemaProperty(name = "发送时间")
    private Date sendTime;

    @SchemaProperty(name = "发送状态")
    private Integer status;

    @SchemaProperty(name = "扩展字段")
    private String extras;

    @SchemaProperty(name = "是否为当前用户发送")
    private Boolean isMe;

    @SchemaProperty(name = "接收者")
    private String receiverId;

    @SchemaProperty(name = "会话标识")
    private String conversationId;

    @SchemaProperty(name = "未读消息数")
    private Integer unreadMsg;

    @SchemaProperty(name = "患者卡片")
    private SdlPatientDTO patientInfo;

    @Override
    public String getName() {
        return this.senderId;
    }
}